package com.wangsong.service;

import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;

class RedissonThread extends Thread {
    
    private int i = 0;
    private RedissonUtils redissonUtils;
   
   public RedissonThread(RedissonUtils redissonUtils_ ) {
	   redissonUtils=redissonUtils_;
   }
    
    @Override
    public void run() {
    	try {
    		//RLock lock=redissonUtils.lock("anyLock");
			 for (i = 0; i < 2; i++) {
				 System.out.println(redissonUtils.makeId("alibaba"));
		     }
			 //redissonUtils.unlock(lock);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
    }
}
